package helloworld.dao;

import helloworld.model.UserPark;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by admin on 2017/3/4.
 */
public interface UserParkDao extends JpaRepository<UserPark, Integer> {
    @Query(value = "SELECT a.* from user_park a where a.user_id=:userId and a.park_id=:parkId",nativeQuery = true)
    UserPark getUserPark(@Param("userId") Integer userId,@Param("parkId") Integer parkId);
}
